load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

rust_library(
    name = "ledger_core",
    srcs = glob(["src/**"]),
    crate_name = "ic_ledger_core",
    version = "0.9.0",
    deps = [
        # Keep sorted.
        "//packages/ic-ledger-hash-of:ic_ledger_hash_of",
        "@crate_index//:candid",
        "@crate_index//:ic-stable-structures",
        "@crate_index//:minicbor",
        "@crate_index//:num-traits",
        "@crate_index//:serde",
        "@crate_index//:serde_bytes",
    ],
)

rust_test(
    name = "ledger_core_test",
    crate = ":ledger_core",
    deps = [
        "@crate_index//:proptest",
    ],
)

rust_doc_test(
    name = "ledger_core_doc_test",
    crate = ":ledger_core",
)
